import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import '@/plugins/element.js';
import "@/assets/css/base.css";
import echarts from 'echarts'
Vue.config.productionTip = false
Vue.prototype.$echarts = echarts
router.beforeEach((to,form,next) =>{
  if(!localStorage.getItem('username')) {
    if(to.path !== '/login') {
      next('/login')
    } else next()
  } next()
})
new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
